﻿/****************************************************************************
*                                                                           *
* Copyright (c) Ionescu M. Marius. All rights reserved(2010).               *
*                                                                           *
****************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using NS_Controls;
using System.Collections;
using AjaxControlToolkit;
using System.Drawing;
using System.Web.UI.HtmlControls;

public partial class MainPage : SessionControlBase
{


    public void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                LoadData();
            }
        }
        catch (Exception ex)
        {
            this.SetMessage(ex.Message, true);
        }
    }

    private void LoadData()
    {
        try
        {
            DataSet ds_Type = Hipocrate.DB.DBConnection.GetData("Sections_Select", new string[] { }, new object[] { });
            DataView dv1 = ds_Type.Tables[0].DefaultView;

            if (dv1.Count > 0)
            {
                drpSection.DataSource = dv1;
                drpSection.DataTextField = "Name";
                drpSection.DataValueField = "Code";
                drpSection.DataBind();
            }
            
        }
        catch (Exception ex)
        {
            this.SetMessage(ex.Message, true);
        }
    }
}
